<?php
declare (strict_types = 1);

namespace app\validate\Menus;

use think\Validate;

class Base extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'parentId' => ['require'],
        'name' => ['require'],
        'type' => ['require'],
        'perm' => ['require'],
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
        'name.require' =>'菜单名称不能为空' ,
        'perm.require' =>'权限标识不能为空' ,
        'type.require' =>'菜单类型不能为空' ,
    ];
}
